package com.dfrz.bookstore.service;

import com.dfrz.bookstore.entry.Book;
import com.dfrz.bookstore.entry.ShoppingCar;
import com.dfrz.bookstore.entry.User;

import java.util.List;

/**
 * 类功能描述:
 *
 * @Author keyan
 * @Date 2021/5/19 10:09
 */
public interface ShoppingCarService {
    /**
     * 添加购物车
     * @param
     */
    void insertShoppingCar(User user, Book book, int num);

    /**
     * 通过id删除购物车
     * @param id
     */
    void delectShoppingCarById(int id);

    /**
     * 更新购物车信息
     * @param shoppingCar
     */
    void upDataShoppingCar(ShoppingCar shoppingCar);


    /**
     * 搜索购物车
     * @return
     */
    List<ShoppingCar> findCarByCar(ShoppingCar shoppingCar);

    /**
     * 购物车分页
     * @param shoppingCar
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<ShoppingCar> findCarByPage(ShoppingCar shoppingCar, int pageNum, int pageSize);
}
